package argirithm;

/**统计小写字母出现次数*/
public class Demo3 {
    public static void main(String[] args) {
        String str = "你时代峻峰fjksdjflksdjflksmncoqaaaa";
        int[] counter = new int [26];
        for (int i = 0; i <str.length() ; i++) {
            char zm = str.charAt(i);
            if (zm >= 'a' && zm<='z'){
                counter[zm-'a']++;
            }
        }
        for (char c='a'; c<='z';c++) {
            System.out.println(c+":"+counter[c-'a']);
        }
    }
}
